{extend name="admin/layout" /}
{block name="main"}
<div id="main-container">
    <div id="breadcrumb">
        <ul class="breadcrumb">
            <li><i class="fa fa-home"></i><a href="/"> 首页</a></li>
            <li><i class="fa fa-desktop"></i><a href="{:url('index')}"> 管理后台</a></li>
            <li class="active">用户列表</li>
        </ul>
    </div><!-- /breadcrumb-->
    <div class="main-header clearfix">
        <div class="page-title">
            <h3 class="no-margin">用户列表</h3>
        </div><!-- /page-title -->
    </div>
    <div class="padding-md">
        <div class="row">
            <div class="col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">
                        用户列表
                    </div>
                    <div class="panel-body">
                        <form method="post">
                            <input type="hidden" name="action" value="search">
                            <div class="input-group xs-mb-15">
                                <input type="text" placeholder="请输入要搜索的用户名或者QQ！" name="s"
                                       class="form-control text-center"
                                       required>
                        <span class="input-group-btn">
                        <button type="submit" class="btn btn-primary">立即搜索</button>
                        </span>
                            </div>
                        </form>
                    </div>
                    <div class="panel-body table-responsive">
                        <table class="table table-bordered table-condensed table-hover table-striped table-vertical-center">
                            <thead>
                            <tr>
                                <th>UID</th>
                                <th>用户名</th>
                                <th>身份</th>
                                <th>所属站点</th>
                                <th>QQ</th>
                                <th>余额</th>
                                <th>充值余额</th>
                                <th>元宝</th>
                                <th>充值元宝</th>
                                <th>注册时间</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="$userList" id="user"}
                            <tr>
                                <td>{$user.uid}</td>
                                <td>{$user.user}</td>
                                <td>
                                    <form method="post">
                                        <input type="hidden" name="action" value="daili">
                                        <input type="hidden" name="uid" value="{$user.uid}">
                                        <select name="power">
                                            <option value="0">普通用户</option>
                                            {for start="1" end="9"}
                                            <option value="{$i}" {if condition="$user.power eq $i"}selected{/if}>VIP{$i}</option>
                                            {/for}
                                        </select>
                                        <button>修改</button>
                                    </form>
                                </td>
                                <td>{$user.zid}</td>
                                <td>{$user.qq}</td>
                                <td>{$user.point}</td>
                                <td>
                                    <form method="post">
                                        <input type="hidden" name="action" value="cz">
                                        <input type="hidden" name="uid" value="{$user.uid}">
                                        <input type="text" name="point" value="10" style="width: 80px;;">
                                        <input type="submit" value="充值">
                                    </form>
                                </td>
                                <td>{$user.coin}</td>
                                <td>
                                    <form method="post">
                                        <input type="hidden" name="action" value="czyb">
                                        <input type="hidden" name="uid" value="{$user.uid}">
                                        <input type="text" name="point" value="10" style="width: 80px;;">
                                        <input type="submit" value="充值">
                                    </form>
                                </td>
                                <td>{$user.regtime}</td>
                                <td>
                                    <a href="?action=del&uid={$user.uid}" class="btn-xs btn-warning"
                                       onclick="return confirm('确认删除？');">删除</a>
                                    <a href="{:url('userinfo',['uid'=>$user.uid])}" class="btn-xs btn-info">修改</a>
                                </td>
                            </tr>
                            {/volist}
                            <tr class="text-center">
                                <td colspan="15">{$pageList->showPage()}</td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}